home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / dev / gui / textfield.lha / Textfield / Oberon / TextField.mod < prev   
Text File  |  1995-06-23  |  3KB  |  137 lines

  1. MODULE TextField;
  2.  
  3. (* Oberon Interface for textfield.gadget © 1995 Mark Thomas
  4. ** $VER: TextField.mod 3.1 (24.2.94)
  5. **
  6. ** Stefan
  7. **
  8. ** slbrbbbh@w250zrz.zrz.TU-Berlin.de
  9. **    StElb@IRC
  10. **
  11. ** Updated for V3.1 by Mark Thomas
  12. *)
  13.  
  14. IMPORT Exec, I := Intuition, u := Utility;
  15.  
  16. (*
  17.  * textfield.h
  18.  *
  19.  * Copyright © 1995 Mark Thomas
  20.  *
  21.  * Defines for the BOOPSI textfield.gadget V3.1.
  22.  *)
  23. CONST
  24.  
  25. tagBase = u.user + 04000000H;
  26.  
  27. (*
  28.  * V1
  29.  *)
  30.  
  31. text          * = tagBase + 1;
  32. insertText    * = tagBase + 2;
  33. textFont      * = tagBase + 3;
  34. delimiters    * = tagBase + 4;
  35. top           * = tagBase + 5;
  36. blockCursor   * = tagBase + 6;
  37. size          * = tagBase + 7;
  38. visible       * = tagBase + 8;
  39. lines         * = tagBase + 9;
  40. noGhost       * = tagBase + 10;
  41. maxSize       * = tagBase + 11;
  42. border        * = tagBase + 12;
  43. textAttr      * = tagBase + 13;
  44. fontStyle     * = tagBase + 14;
  45. up            * = tagBase + 15;
  46. down          * = tagBase + 16;
  47. alignment     * = tagBase + 17;
  48. vCenter       * = tagBase + 18;
  49. ruledPaper    * = tagBase + 19;
  50. paperPen      * = tagBase + 20;
  51. inkPen        * = tagBase + 21;
  52. linePen       * = tagBase + 22;
  53. userAlign     * = tagBase + 23;
  54. spacing       * = tagBase + 24;
  55. clipStream    * = tagBase + 25;
  56. clipStream2   * = tagBase + 26;
  57. undoStream    * = tagBase + 26;
  58. blinkRate     * = tagBase + 27;
  59. inverted      * = tagBase + 28;
  60. partial       * = tagBase + 29;
  61. cursorPos     * = tagBase + 30;
  62.  
  63. (*
  64.  * V2
  65.  *)
  66.  
  67. readOnly      * = tagBase + 31;
  68. modified      * = tagBase + 32;
  69. acceptChars   * = tagBase + 33;
  70. rejectChars   * = tagBase + 34;
  71. passCommand   * = tagBase + 35;
  72. lineLength    * = tagBase + 36;
  73. maxSizeBeep   * = tagBase + 37;
  74. deleteText    * = tagBase + 38;
  75. selectSize    * = tagBase + 39;
  76. copy          * = tagBase + 40;
  77. copyAll       * = tagBase + 41;
  78. cut           * = tagBase + 42;
  79. paste         * = tagBase + 43;
  80. erase         * = tagBase + 44;
  81. undo          * = tagBase + 45;
  82.  
  83. (*
  84.  * V3
  85.  *)
  86.  
  87. tabSpaces     * = tagBase + 46;
  88. nonPrintChars * = tagBase + 47;
  89.  
  90. (*
  91.  *Border
  92.  *
  93.  * See docs for width and height sizes these borders are
  94.  *)
  95.  
  96. none              * = 0;
  97. bevel             * = 1;
  98. doubleBevel       * = 2;
  99.  
  100. (*
  101.  *Alignment
  102.  *)
  103.  
  104. left             * = 0H;
  105. center           * = 1H;
  106. right            * = 2H;
  107.  
  108. VAR
  109.   base * : Exec.LibraryPtr;
  110.   textFieldClass * : I.IClassPtr;
  111.  
  112. PROCEDURE GetClass      *{base,-30}():I.IClassPtr;
  113. (*
  114.  * I don't know the type for C's char*.
  115.  *
  116.  * PROCEDURE GetCopyright  *{base,-36}():CharPtr;
  117.  *)
  118.  
  119. BEGIN
  120. (*
  121.  * TextField autoinit and autoterminate functions
  122.  * for Oberon.
  123.  *
  124.  * If you just compile and link this into your app
  125.  * then TextFieldBase will automatically get setup
  126.  * before main() is called.
  127.  *)
  128.  
  129. base := Exec.OpenLibrary("gadgets/textfield.gadget", 3);
  130. textFieldClass := GetClass();
  131.  
  132. CLOSE
  133.  
  134. IF base#NIL THEN Exec.CloseLibrary(base) END;
  135.  
  136. END TextField.
  137.